import React, { Component } from 'react';
import {
    Text, Image, View, ToastAndroid, PixelRatio, ScrollView, TouchableOpacity,AppRegistry
} from 'react-native';
import TestFunctionUtils from '../util/TestFunctionUtils';

import Head from './layout/Head';
import styles from '../../assets/css/style.js';
import GlobalConfig from '../util/Global';
const rem = GlobalConfig.WIDTH / 7.5;

/**
 * 下挂设备
 */
export default class UnderbarrelDeviceView extends Component {
    constructor(props) {
        super(props);
        this.state = {

        };
    }
    render(){
        const {navigate} = this.props.navigation;
        const lists=[["首 页", "icon_in", GlobalConfig.LOGIN_VIEW],
                     ["测试功能", "icon_cs", GlobalConfig.TESTING_VIEW],
                     ["状态查看", "icon_ck", GlobalConfig.STATUS_CHECK_VIEW],
                     ["设 置", "icon_sz", GlobalConfig.SETTING_VIEW]];
        return (
            <View style={[styles.flex,styles.bgcolor]}>
                <Head title="下挂设备" list={lists} navigate={navigate} ref="head"> </Head>
                <View style={styles.flex}>
                    <ScrollView style={styles.ztScroll}>
                        <TouchableOpacity activeOpacity={1} onPress={() => this.refs.head.hideMenu()}>
                            <View style={styles.DeviceWrap}>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_huawei.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>HUAWEI_P9</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_iphone.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>IPHONE_PLUS</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_huawei.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>HUAWEI_P9</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_iphone.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>IPHONE_PLUS</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_iphone.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>IPHONE_PLUS</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_huawei.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>HUAWEI_P9</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                                <View style={styles.DeviceList}>
                                    <View style={styles.DLeft}>
                                        <Image
                                            style={styles.DLIcon}
                                            resizeMode="contain"
                                            source={require('../../assets/img/icon_iphone.png')}
                                        />
                                        <View>
                                            <Text style={styles.DLFont_01}>IPHONE_PLUS</Text>
                                            <View style={styles.direction}>
                                                <Text style={[styles.DLFont_02,styles.DLFont_03]}>2.4G</Text>
                                                <Text style={styles.DLFont_02}>10分钟前</Text>
                                            </View>
                                        </View>
                                    </View>
                                    <Text style={styles.DLFont_02}>200KB/s</Text>
                                </View>
                            </View>
                        </TouchableOpacity>
                    </ScrollView>
                </View>
            </View>
        );
    }
}